package com.jr.service.impl;

import com.jr.mapper.EmpMapper;
import com.jr.pojo.Emp;
import com.jr.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;

@Service
@Transactional(propagation = Propagation.REQUIRED)
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public Emp queryEmp(Emp emp) {
        return empMapper.selectEmp(emp);

    }

    @Override
    public ArrayList<Emp> queryEmps(Emp emp) {
        return empMapper.selectEmps(emp);
    }
}
